package com.ss.android.article.base.feature.detail2.view;

import android.animation.Animator;
import android.animation.ValueAnimator;

import com.ss.android.article.base.feature.detail2.e.NewDetailPresenter;
import com.ss.android.article.base.feature.detail2.widget.DetailTitleBar;
import com.ss.android.article.base.feature.detail2.widget.DetailToolBar;

public final class DetailTitleBarHelper {
    DetailTitleBar detailTitleBar;
    DetailToolBar detailToolBar;
    ValueAnimator fadeInAnimator;
    ValueAnimator fadeOutAnimator;
    Animator.AnimatorListener fadeInAnimatorListener;
    Animator.AnimatorListener fadeOutAnimationListener;
    NewDetailPresenter newDetailPresenter;

    public DetailTitleBarHelper(NewDetailPresenter newDetailPresenter, DetailTitleBar detailTitleBar, DetailToolBar detailToolBar) {
        this.newDetailPresenter = newDetailPresenter;
        this.detailTitleBar = detailTitleBar;
        this.detailToolBar = detailToolBar;
    }

    final void toggleBarEnable(boolean enable) {
        for(int i = 0; i < this.detailTitleBar.getChildCount(); ++i) {
            this.detailTitleBar.getChildAt(i).setEnabled(enable);
        }

        int i = 0;
        while(i < this.detailToolBar.getChildCount()) {
            this.detailToolBar.getChildAt(i).setEnabled(enable);
            ++i;
        }
    }
}

